#Copyright (c) 2025, Alibaba Cloud and its affiliates;
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at

#   http://www.apache.org/licenses/LICENSE-2.0

#Unless required by applicable law or agreed to in writing, software
#distributed under the License is distributed on an "AS IS" BASIS,
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#See the License for the specific language governing permissions and
#limitations under the License.



import fce_util.libs.common as common
from fce_util.deploys import kube_check, tools_check, tools_install, resource_obj
from fce_util.libs.log import g_logger

logging = g_logger.logger

def make(parser):
    """
    fce ray cluster env deploy
    """
    proxy_entry_points = [
        ('tool_check', tools_check.make),
        ('tool_install', tools_install.make),
        ('kube_check', kube_check.make),
        ('res_obj', resource_obj.make),
    ]

    proxy_parser = parser.add_subparsers(dest = 'deploy')
    proxy_parser.required = True

    for (name, fn) in proxy_entry_points:
        p = proxy_parser.add_parser(
            name,
            description = fn.__doc__,
            help = fn.__doc__,
            )
        fn(p)
        p.required = True